﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Zhongchouwwwww.Models;

namespace Zhongchouwwwww.webform
{
    enum ProjectClass
    {
        AllProject = 1,
        ReadyProject = 2,
        CompleteProject = 3,
    }
    
    public partial class DDDDD : System.Web.UI.Page
    {
        public static List<int> fenye = new List<int>() { 1, 2, 3, 4 };
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!IsPostBack)
            //{
            //    DataSet(1);
            //}


            DataListS.DataSource = BAL.GetDate.GetProjectListByType("全部", 1, "", "");
            DataListS.DataBind();
        }

        private void DataSet(int i)
        {
            switch (i)
            {
                case 1:
                    Projectitem.DataSource = BAL.GetDate.GetProjectList(1);
                    break;
                case 2:
                    Projectitem.DataSource = BAL.GetDate.GetProjectList(2);
                    break;
                case 3:
                    Projectitem.DataSource = BAL.GetDate.GetProjectList(3);
                    break;
                default:
                    break;
            }
            Projectitem.DataBind();
        }

        /// <summary>
        /// 数据转换
        /// </summary>
        /// <param name="item">数据源</param>
        /// <returns></returns>


        protected void DataShow_all_Click(object sender, EventArgs e)
        {
            Response.Redirect("WebForm2.aspx?id=1");
            //DataSet(1);
        }

        protected void DataShow_ing_Click(object sender, EventArgs e)
        {
            Response.Redirect("WebForm2.aspx");
            //DataSet(2);
        }

        protected void DataShow_ed_Click(object sender, EventArgs e)
        {
            DataSet(3);
        }

       
    }
}